//实现层
package FactorMethod.idcard;

import FactorMethod.framework.Product;

public class IDCard extends Product {
    private String owner;
    private int id;
    IDCard(String owner,int id){
        System.out.println("制作"+owner+id+"卡");//初始化对象核心属性  嵌入对象创建时的业务逻辑  符合工厂方法模式的协作
        this.owner=owner;
        this.id=id;
    }
    public void use(){
        System.out.println("使用"+owner+id+"卡");
    }
    public String getOwner(){
        return owner;
    }
    public int getId(){
        return id;
    }

}
